<template>
	<el-drawer title="招聘任务详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="关联计划" prop="planTitle">{{form.title}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="招聘人员姓名" prop="userName">{{form.userName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="到岗时间" prop="workDate">{{form.workDate}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="联系电话" prop="linkTel">{{form.linkTel}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="拟定薪资" prop="salary">{{form.salary}}/元
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="招聘工种" prop="workJob">{{form.workJobName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="备注说明">{{form.remark}}
					</el-form-item>
					<el-form-item label="相关附件" v-if="form.attachId!=''">
						<attach-menu :attachIds="form.attachId" :roleFlag="3" :preview="true"></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				taskId: '',
				title: '',
				userName: '',
				workDate:'',
				workJobName: '',
				linkTel: '',
				salary:'',
				attachId: '',
				remark: ''
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.taskId = data.taskId
			this.form.title = data.title
			this.form.userName = data.userName
			this.form.workDate = data.workDate
			this.form.workJobName = data.workJobName
			this.form.linkTel = data.linkTel
			this.form.salary = data.salary
			this.form.attachId = data.attachId
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
